<?php
 /***************************************************************
 * Mor-MVC Framework, A framework that can easily let you build a powerful
 * and scalable web application based on PHP language,
 * this framewrok is a copy of the Zend Behavior Framework
 *  Copyright (C) 2010  Nabil Droussi <nabildroussi@gmail.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ***************************************************************/

//make php errors and notices visible in the output page
error_reporting(E_ALL|E_WARNING);
@session_start();
$rootDirectory = dirname(__FILE__);
$documentRoot = $rootDirectory!="/"?$rootDirectory:"";
$PHPLIB_DIR = $documentRoot . '/phplib';
$PEAR_LIB_DIR = $documentRoot . '/PEAR';
$templatesPath = $documentRoot . 'templates';

ini_set("include_path",PATH_SEPARATOR.$PHPLIB_DIR.PATH_SEPARATOR.$PEAR_LIB_DIR.PATH_SEPARATOR.ini_get("include_path"));

include("RL/FrontController.php");
$front = FrontController::getInstance();
$front->setIncludePath($PHPLIB_DIR);
$front->setIncludePath($documentRoot."/phplib");
$front->setAbsolutePath($documentRoot."/");
$front->setTemplateDirectory($documentRoot."/templates");
try
{
	$front->dispatch();
}catch(Exception $ex)
{
	echo $ex->getMessage();
	
}

?>